import javax.swing.UIManager;
import javax.swing.UIManager.LookAndFeelInfo;
import javax.swing.UnsupportedLookAndFeelException;

import view.MainFrame;
import db.DbManager;

/**
 * 
 */

/**
 * @author spiller.sebastian
 *
 */
public class Start {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		LookAndFeelInfo[] laf = UIManager.getInstalledLookAndFeels();
		
		for(int i = 0;i<laf.length;i++){
			System.out.println(laf[i].getName());
		}
		try {
			UIManager.setLookAndFeel(laf[1].getClassName());
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (UnsupportedLookAndFeelException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		String[] login = new LoginDialog(null).askForLogin(); 
		
		DbManager.USER = login[0];
		DbManager.PASS = login[1];
		
		MainFrame frame = new MainFrame();
		frame.setVisible(true);
	}

}
